﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cricket.LinqModel
{
    public partial class Admin
    {
        private IDataRepository _dataObject;
         public Admin(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
         public void Create()
         {
             _dataObject.CreateAdmin(this);
         }
         public void UpdateAdmin()
         {
             _dataObject.UpdateAdmin(this);
         }
         public void UpdateAdminFlag()
         {
             _dataObject.UpdateAdminFlag(this);
         }
         public List<Admin> GetAllAdmin()
         {
             return _dataObject.GetAllAdmin();
         }
         public List<AdminResult> GetAdminDetailsById(int Id)
         {
             return _dataObject.GetAdminDetailsById(Id);
         }
         public void DeleteAdmin()
         {
             _dataObject.DeleteAdmin(this);
         }
         public List<SpLoginUserResult> GetAdminByCredential(string username, string password, string password2)
         {
             return _dataObject.GetAdminByCredential(username, password, password2);
         }
         public List<GetCommonRateResult> GetCommonRate(int adminId)
         {
             return _dataObject.GetCommonRate(adminId);
         }
         public List<Admin> GetInActiveAdmin()
         {
             return _dataObject.GetInActiveAdmin();
         }
    }
}
